<?php 
header("Content-type: text/javascript");
//---------------------------------------------------
// Include JQUERY LIB
//---------------------------------------------------
// JQUERY
include('jquery_lib/jquery.js');
// Plugins lib
// gestion des effets Scrolling
include('jquery_lib/jquery.scrollTo.js');
// gestion des effets Accordion
include('jquery_lib/jquery.accordion.js');
// gestion des cookies
include('jquery_lib/jquery.cookie.js');
// gestion des listes type arbos
include('jquery_lib/jquery.treeView.js');
// gestion des bords arrondis
include('jquery_lib/jquery.corners.js');
// gestion des hover
include('jquery_lib/jquery.background.js');
include('jquery_lib/jquery.dimensions.js');
include('jquery_lib/jquery.ahover.js');
include('jquery_lib/jquery.colors.js');
?>

/////////////////////////////////////////////////////
// JQUERY LIB onload
/////////////////////////////////////////////////////
jQuery (function($) {


	// ----------------------------------------------
	// ACCESSIBILITY
	// ----------------------------------------------	
	// show/hide slide options WAI
	$('#accessibility').css('display','none');
	$('#accessibility_bt').click(function(){
		$('#accessibility').animate({ 
		width:'toggle'},"fast");
		return false;
	});



	// ----------------------------------------------
	// TOGGLE VALUE
	// ----------------------------------------------
    $("input:text, textarea, input:password").each(function(){
        if(this.value == '')
            this.value = this.title;
    });
    $("input:text, textarea, input:password").focus(function(){
        if(this.value == this.title)
            this.value = '';
    });
    $("input:text, textarea, input:password").blur(function(){
        if(this.value == '')
            this.value = this.title;
    });
    $("input:image, input:button, input:submit").click(function(){
        $(this.form.elements).each(function(){
            if(this.type =='text' || this.type =='textarea' || this.type =='password' ){
                if(this.value == this.title && this.title != ''){
                    this.value='';
                }
            }
        });
    });
	
	
	
	// ----------------------------------------------
	// LEXIQUE
	// ----------------------------------------------	
	$('#lexique').accordion({ 
		autoheight: false,
		active: '.select', 
    	header: '.li',
		alwaysOpen: false
	});

	// ----------------------------------------------
	// MAIN MENU
	// ----------------------------------------------
	$('#main_menu a').css({
		backgroundPosition: '50% 0%',
		color: '#2f3f51'		
	});
	$('#main_menu a span').css({
		backgroundPosition: '50% 200%'
	});	
	$('#main_menu a').hover(function(){
		$(this).animate({
			backgroundPosition: '(50% 100%)',
			color: '#FFFFFF'
		});
		$(this).find('span').animate({
			backgroundPosition: '(50% 100%)'
		});
	},function(){
		$(this).animate({
			backgroundPosition: '(50% 0%)',
			color: '#2f3f51'				
		});
		$(this).find('span').animate({
			backgroundPosition: '(50% 200%)'
		});
	});

});

